solving linear system of equations